package com.lazyfish.factorybean;

import com.lazyfish.ioc.UserDao;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ProxyFactoryBeanTest {
    @Test
    public void test(){
        ApplicationContext applicationContext  =  new ClassPathXmlApplicationContext("applicationContext.xml");
        UserDao userDao = (UserDao)applicationContext.getBean("userDaoProxy");
        userDao.say();
        userDao.love();
    }
}
